<template>
  <div>
    <form action="">
      姓名: <input type="text" v-model="user.name"> <br>
      年龄: <input type="text" v-model="user.age"> <br>
      工资: <input type="text" v-model="user.salary"> <br>
      个人简介: <input type="text" v-model="user.des"> <br>
      <input type="button" value="保存用户" @click="saveUser">
      <input type="button" value="取消" @click="$router.push({name:'User'})">
    </form>
  </div>
</template>

<script>
export default {
  name: "UpdataUser",
  data() {
  },
  methods: {},
  computed: {},
  created() { //初始化阶段发送请求查询所有用户信息
    this.$http.get("http://localhost:8990/users/").then(res => {
      this.users = res.data;
    });
  },
}
</script>

<style scoped>

</style>
